package jesss.options;

import com.amazonaws.services.s3.AmazonS3;
import jesss.commands.CommandType;
import org.apache.commons.cli.Options;

/**
 * User: Lee
 * Date: 8/16/13
 * Time: 11:17 AM
 */
public class JesssOptions {

    private AmazonS3 amazonS3;
    public AmazonS3 getAmazonS3() {
        return amazonS3;
    }

    private boolean shouldDisplayVerbose = false;
    public boolean getShouldDisplayVerbose() {
        return shouldDisplayVerbose;
    }

    private String commandName;
    public String getCommandName() {
        return commandName;
    }
    private String[] args;
    public String[] getArgs() {
        return args;
    }

    private Options options;
    public Options getOptions() {
        return options;
    }

    public static class Builder {
        private boolean shouldDisplayVerbose = false;
        private String commandName;
        private AmazonS3 amazonS3;
        private String[] args;
        private Options options;

        public Builder(String commandName) {
            this.commandName = commandName;
        }

        public Builder shouldDisplayVerbose(boolean value) {
            shouldDisplayVerbose = value;
            return this;
        }

        public Builder amazonS3(AmazonS3 value) {
            amazonS3 = value;
            return this;
        }

        public Builder args(String[] value) {
            args = value;
            return this;
        }

        public Builder options(Options value) {
            options = value;
            return this;
        }

        public JesssOptions build() {
            return new JesssOptions(this);
        }
    }

    private JesssOptions (Builder builder) {
        amazonS3 = builder.amazonS3;
        shouldDisplayVerbose = builder.shouldDisplayVerbose;
        commandName = builder.commandName;
        args = builder.args;
        options = builder.options;
    }
}
